<!DOCTYPE html>
<html lang=zh>
<head><meta name="generator" content="Hexo 3.9.0">
    <!-- so meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="HandheldFriendly" content="True">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="description" content="前言今天早上好气呀！因为项目原因需要在自己电脑上安装一个mysql，去官网下载mysql的安装工具，结果到了最后一步无法配置mysql，就是那种可以选但是没有下一步按钮，这不是为难用户吗？折腾了半天只能删除mysql installer，下载 mysql 源码进行安装。下面简单描述下自己的安装过程： 安装 mysql 下载 mysql 源码官网下载地址  下载完成之后将其解压到本地目录，在mysq">
<meta name="keywords" content="windows,mysql">
<meta property="og:type" content="article">
<meta property="og:title" content="windows下安装mysql的正确打开方式">
<meta property="og:url" content="https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/index.html">
<meta property="og:site_name" content="月光倾城的代码小屋">
<meta property="og:description" content="前言今天早上好气呀！因为项目原因需要在自己电脑上安装一个mysql，去官网下载mysql的安装工具，结果到了最后一步无法配置mysql，就是那种可以选但是没有下一步按钮，这不是为难用户吗？折腾了半天只能删除mysql installer，下载 mysql 源码进行安装。下面简单描述下自己的安装过程： 安装 mysql 下载 mysql 源码官网下载地址  下载完成之后将其解压到本地目录，在mysq">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://ouizhbgin.bkt.clouddn.com/blog/2017/10/30/mysql_source.png">
<meta property="og:image" content="http://ouizhbgin.bkt.clouddn.com/blog/2017/10/30/mysql_system_path.png">
<meta property="og:image" content="http://ouizhbgin.bkt.clouddn.com/blog/2017/10/30/mysql_start.png">
<meta property="og:updated_time" content="2020-01-15T06:30:09.120Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="windows下安装mysql的正确打开方式">
<meta name="twitter:description" content="前言今天早上好气呀！因为项目原因需要在自己电脑上安装一个mysql，去官网下载mysql的安装工具，结果到了最后一步无法配置mysql，就是那种可以选但是没有下一步按钮，这不是为难用户吗？折腾了半天只能删除mysql installer，下载 mysql 源码进行安装。下面简单描述下自己的安装过程： 安装 mysql 下载 mysql 源码官网下载地址  下载完成之后将其解压到本地目录，在mysq">
<meta name="twitter:image" content="http://ouizhbgin.bkt.clouddn.com/blog/2017/10/30/mysql_source.png">
    
    
        
          
              <link rel="shortcut icon" href="/images/favicon.ico">
          
        
        
          
            <link rel="icon" type="image/png" href="/images/favicon-192x192.png" sizes="192x192">
          
        
        
          
            <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
          
        
    
    <!-- title -->
    <title>windows下安装mysql的正确打开方式</title>
    <!-- styles -->
    <link rel="stylesheet" href="/css/style.css">
    <!-- persian styles -->
    
      <link rel="stylesheet" href="/css/rtl.css">
    
    <!-- rss -->
    
    
</head>

<body class="max-width mx-auto px3 ltr">
    
      <div id="header-post">
  <a id="menu-icon" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="menu-icon-tablet" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="top-icon-tablet" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');" style="display:none;"><i class="fas fa-chevron-up fa-lg"></i></a>
  <span id="menu">
    <span id="nav">
      <ul>
         
          <li><a href="/">首页</a></li>
         
          <li><a href="/archives/">归档</a></li>
         
          <li><a href="/search/">搜索</a></li>
         
          <li><a href="/tags/">标签</a></li>
         
          <li><a href="/others/">其他文章</a></li>
        
      </ul>
    </span>
    <br/>
    <span id="actions">
      <ul>
        
        <li><a class="icon" href="/2017/11/03/node_env_usage/"><i class="fas fa-chevron-left" aria-hidden="true" onmouseover="$('#i-prev').toggle();" onmouseout="$('#i-prev').toggle();"></i></a></li>
        
        
        <li><a class="icon" href="/2017/10/30/koa2_await_suport/"><i class="fas fa-chevron-right" aria-hidden="true" onmouseover="$('#i-next').toggle();" onmouseout="$('#i-next').toggle();"></i></a></li>
        
        <li><a class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up" aria-hidden="true" onmouseover="$('#i-top').toggle();" onmouseout="$('#i-top').toggle();"></i></a></li>
        <li><a class="icon" href="#"><i class="fas fa-share-alt" aria-hidden="true" onmouseover="$('#i-share').toggle();" onmouseout="$('#i-share').toggle();" onclick="$('#share').toggle();return false;"></i></a></li>
      </ul>
      <span id="i-prev" class="info" style="display:none;">上一篇</span>
      <span id="i-next" class="info" style="display:none;">下一篇</span>
      <span id="i-top" class="info" style="display:none;">返回顶部</span>
      <span id="i-share" class="info" style="display:none;">分享文章</span>
    </span>
    <br/>
    <div id="share" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/"><i class="fab fa-facebook " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&text=windows下安装mysql的正确打开方式"><i class="fab fa-twitter " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-linkedin " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&is_video=false&description=windows下安装mysql的正确打开方式"><i class="fab fa-pinterest " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=windows下安装mysql的正确打开方式&body=Check out this article: https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/"><i class="fas fa-envelope " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-get-pocket " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-reddit " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-stumbleupon " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-digg " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&name=windows下安装mysql的正确打开方式&description="><i class="fab fa-tumblr " aria-hidden="true"></i></a></li>
</ul>

    </div>
    <div id="toc">
      <ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#前言"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#安装-mysql"><span class="toc-number">2.</span> <span class="toc-text">安装 mysql</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#史上最坑集合"><span class="toc-number">3.</span> <span class="toc-text">史上最坑集合</span></a></li></ol>
    </div>
  </span>
</div>

    
    <div class="content index py4">
        
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  <header>
    
    <h1 class="posttitle" itemprop="name headline">
        windows下安装mysql的正确打开方式
    </h1>



    <div class="meta">
      <span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">月光倾城的代码小屋</span>
      </span>
      
    <div class="postdate">
        <time datetime="2017-10-30T10:21:10.000Z" itemprop="datePublished">2017-10-30</time>
    </div>


      

      
    <div class="article-tag">
        <i class="fas fa-tag"></i>
        <a class="tag-link" href="/tags/mysql/">mysql</a>, <a class="tag-link" href="/tags/windows/">windows</a>
    </div>


    </div>
  </header>
  

  <div class="content" itemprop="articleBody">
    <h4 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h4><p>今天早上好气呀！因为项目原因需要在自己电脑上安装一个<code>mysql</code>，去官网下载<code>mysql</code>的安装工具，结果到了最后一步无法配置<code>mysql</code>，就是那种可以选但是没有下一步按钮，这不是为难用户吗？折腾了半天只能删除<code>mysql installer</code>，下载 mysql 源码进行安装。下面简单描述下自己的安装过程：</p>
<h4 id="安装-mysql"><a href="#安装-mysql" class="headerlink" title="安装 mysql"></a>安装 mysql</h4><ol>
<li><p><strong>下载 mysql 源码</strong><br><a href="https://dev.mysql.com/downloads/mysql/" target="_blank" rel="noopener">官网下载地址</a><br><img src="http://ouizhbgin.bkt.clouddn.com/blog/2017/10/30/mysql_source.png" alt="源码安装"></p>
</li>
<li><p><strong>下载完成之后将其解压到本地目录</strong>，在<code>mysql</code>根目录下新建一个<code>data</code>和一个<code>log</code>文件夹，此外还需要新建一个<code>my.ini</code>文件，用来配置<code>mysql</code>，写入如下代码：</p>
</li>
</ol>
<figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="section">[mysqld]</span></span><br><span class="line"><span class="attr">basedir</span>=D:\mysql</span><br><span class="line"><span class="attr">datadir</span>=D:\mysql\data</span><br></pre></td></tr></table></figure>
<ol start="3">
<li><p>配置<code>mysql</code>的<code>bin\</code>目录到<strong>系统环境变量</strong>，并重启计算机<br><img src="http://ouizhbgin.bkt.clouddn.com/blog/2017/10/30/mysql_system_path.png" alt="系统环境变量"></p>
</li>
<li><p>以管理员身份运行<strong>cmd</strong>，并输入以下代码</p>
</li>
</ol>
<figure class="highlight properties"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 将mysql安装为系统服务</span></span><br><span class="line"><span class="attr">mysqld</span> <span class="string">-install</span></span><br><span class="line"><span class="comment"># mysql初始化，如果需要不开启用户认证，请将mysqld --initialize替换成mysqld --initialize-insecure</span></span><br><span class="line"><span class="attr">mysqld</span> <span class="string">--initialize</span></span><br><span class="line"><span class="comment"># 启动mysql</span></span><br><span class="line"><span class="attr">net</span> <span class="string">start mysql</span></span><br></pre></td></tr></table></figure>
<p>注意：在启动<code>mysql</code>之前一定要进行初始化，否则就会出现<code>‘The mysql service could not be started. The service did not report an error’</code></p>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">C:\Windows\system32&gt;net start mysql</span><br><span class="line">The MySQL<span class="built_in"> service </span>is starting.</span><br><span class="line">The MySQL<span class="built_in"> service </span>could <span class="keyword">not</span> be started.</span><br><span class="line">The<span class="built_in"> service </span>did <span class="keyword">not</span> report an error.</span><br><span class="line">More help is available by typing NET HELPMSG 3534.</span><br></pre></td></tr></table></figure>
<p>如果出现这个错误，请先删除 data\目录下的所有数据，然后重新执行 mysqld –initialize<br><img src="http://ouizhbgin.bkt.clouddn.com/blog/2017/10/30/mysql_start.png" alt="mysql start"></p>
<ol start="5">
<li><strong>最后关于<code>mysql</code>使用<code>root</code>无法登陆，以及如何让本地<code>mysql</code>支持远程访问等这些问题，请翻阅我以前的 csdn 博客</strong>：</li>
</ol>
<ul>
<li><a href="http://blog.csdn.net/u014374031/article/details/54586638" target="_blank" rel="noopener">启动 mysql 出现服务无法启动，服务没有报告任何错误</a></li>
<li><a href="http://blog.csdn.net/u014374031/article/details/51134794" target="_blank" rel="noopener">MySQL 忘记密码怎么办？</a></li>
<li><a href="http://blog.csdn.net/u014374031/article/details/49253135" target="_blank" rel="noopener">教你怎么在<code>windows server 2008</code>的服务器上搭建 mysql 数据库</a></li>
<li><p><a href="http://blog.csdn.net/u014374031/article/details/45484105" target="_blank" rel="noopener">MYSQL 授权管理</a></p>
<pre><code>注意新版的mysql已经将password从user表中移除了，修改密码请使用以下代码
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">use mysql</span><br><span class="line">update<span class="built_in"> user </span><span class="builtin-name">set</span> <span class="attribute">authentication_string</span>=PASSWORD('123456') where <span class="attribute">user</span>=<span class="string">"root"</span>;</span><br></pre></td></tr></table></figure>
</code></pre></li>
</ul>
<h4 id="史上最坑集合"><a href="#史上最坑集合" class="headerlink" title="史上最坑集合"></a>史上最坑集合</h4><p><strong>1、The mysql service on Local computer started and then stopped</strong><br>由于修改 mysql 编码很频繁，导致<code>mysql</code>一直重启又关闭，最后一次重启时竟然不干了，直接报<code>The mysql service on Local computer started and then stopped</code>，我又开了漫天盖地的百度，<code>google</code>，可是愣是没找到一种解决方案（重启电脑都试过两次了）。于是开始试着去读 mysql 的错误日志，发现自己在修改编码的时候在 my.ini 文件的[mysqld]下面加入了<code>character_set_database=utf8</code>，但是<code>mysql</code>并不能识别这个配置。于是我将这一行配置删除掉。并且在注册表删除记录—<code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL</code>。重启<code>mysql</code>，这次报了今天早上遇到的错误<code>“The mysql service could not be started. The service did not report an error”</code>，于是只能删除 data\目录下的所有数据，使用<code>mysqld --initialize-insecure</code>重新初始化一遍，最后才启动成功，我还得重新创建<code>root</code>用户。真心别坑我啊，难受&gt;_&lt;</p>
<p><strong>2. windows mysql 不支持中文</strong><br>修改<code>my.ini</code>配置文件</p>
<figure class="highlight ini"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="section">[mysqld]</span></span><br><span class="line"><span class="attr">basedir</span>=D:\mysql</span><br><span class="line"><span class="attr">datadir</span>=D:\mysql\data</span><br><span class="line"><span class="attr">character_set_server</span>=utf8</span><br><span class="line"></span><br><span class="line"><span class="section">[client]</span></span><br><span class="line"><span class="attr">default-character-set</span>=utf8</span><br><span class="line"></span><br><span class="line"><span class="section">[mysql]</span></span><br><span class="line"><span class="attr">default-character-set</span>=utf8</span><br></pre></td></tr></table></figure>
<p>最后删除<code>mysql</code>下的 data\目录从头到尾再来一遍吧，因为配置虽然改了，但是原来那些创建的表的编码还没有被改变，插入中文还是会出问题。尝试过网上说的直接进入<code>mysql</code>命令行改编码，但是没啥用啊，改了之后推出再进去还是原来的编码。也可能是我改的时候出了啥问题，作为一种方法吧，不行的时候可以试试。</p>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">use mysql;</span><br><span class="line">show variables like<span class="string">'%char%'</span>;</span><br><span class="line"><span class="builtin-name">set</span> <span class="attribute">character_set_database</span>=utf8;</span><br><span class="line"><span class="builtin-name">set</span> <span class="attribute">character_set_server</span>=utf8;</span><br><span class="line"><span class="builtin-name">set</span> <span class="attribute">character_set_client</span>=gbk;</span><br><span class="line"><span class="builtin-name">set</span> <span class="attribute">character_set_connection</span>=gbk;</span><br></pre></td></tr></table></figure>
<p><strong>3、分组查询错误</strong>—<code>this is incompatible with sql_mode=only_full_group_by</code></p>
<p>在 mysql 命令行模式下输入一下代码：</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">SET</span> <span class="keyword">GLOBAL</span> sql_mode=(<span class="keyword">SELECT</span> <span class="keyword">REPLACE</span>(@@sql_mode,<span class="string">'ONLY_FULL_GROUP_BY'</span>,<span class="string">''</span>));</span><br></pre></td></tr></table></figure>
<p>不行的话就执行这句：</p>
<figure class="highlight gams"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">set</span> @@sql_mode <span class="comment">=</span><span class="comment">'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'</span>;</span><br></pre></td></tr></table></figure>
<p>最终使用<code>select @@sql_mode</code>查看取得的值中是否还有<code>ONLY_FULL_GROUP_BY</code></p>
<p>是不是觉得博主是个热爱分享的好人？哈哈~</p>

  </div>
  <div class="statement">
    <hr>  
    1. 如果本文帮到了您，不妨点一下右上角的”<i class="fas fa-share-alt"></i>“按钮。<br>
    2. 除非注明，本博文章均为原创，转载请以链接形式标明本文地址。<br>
    3. 如果你有任何疑问，欢迎发送邮件到我的邮箱<a href="mailto:andyliwr@outlook.com">andyliwr@outlook.com<br>
  </div>
</article>


    <div class="blog-post-comments">
        <div id="gitalk_thread">
            <noscript>加载评论需要在浏览器启用 JavaScript 脚本支持。</noscript>
        </div>
    </div>



        
          <div id="footer-post-container">
  <div id="footer-post">

    <div id="nav-footer" style="display: none">
      <ul>
         
          <li><a href="/">首页</a></li>
         
          <li><a href="/archives/">归档</a></li>
         
          <li><a href="/search/">搜索</a></li>
         
          <li><a href="/tags/">标签</a></li>
         
          <li><a href="/others/">其他文章</a></li>
        
      </ul>
    </div>

    <div id="toc-footer" style="display: none">
      <ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#前言"><span class="toc-number">1.</span> <span class="toc-text">前言</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#安装-mysql"><span class="toc-number">2.</span> <span class="toc-text">安装 mysql</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#史上最坑集合"><span class="toc-number">3.</span> <span class="toc-text">史上最坑集合</span></a></li></ol>
    </div>

    <div id="share-footer" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/"><i class="fab fa-facebook fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&text=windows下安装mysql的正确打开方式"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&is_video=false&description=windows下安装mysql的正确打开方式"><i class="fab fa-pinterest fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=windows下安装mysql的正确打开方式&body=Check out this article: https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/"><i class="fas fa-envelope fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-get-pocket fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-reddit fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-stumbleupon fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&title=windows下安装mysql的正确打开方式"><i class="fab fa-digg fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=https://andyliwr.github.io/2017/10/30/window_mysql_can_not_start/&name=windows下安装mysql的正确打开方式&description="><i class="fab fa-tumblr fa-lg" aria-hidden="true"></i></a></li>
</ul>

    </div>

    <div id="actions-footer">
        <a id="menu" class="icon" href="#" onclick="$('#nav-footer').toggle();return false;"><i class="fas fa-bars fa-lg" aria-hidden="true"></i> 菜单</a>
        <a id="toc" class="icon" href="#" onclick="$('#toc-footer').toggle();return false;"><i class="fas fa-list fa-lg" aria-hidden="true"></i> 目录</a>
        <a id="share" class="icon" href="#" onclick="$('#share-footer').toggle();return false;"><i class="fas fa-share-alt fa-lg" aria-hidden="true"></i> 分享</a>
        <a id="top" style="display:none" class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up fa-lg" aria-hidden="true"></i> 返回顶部</a>
    </div>

  </div>
</div>

        
        <footer id="footer">
  <div class="footer-left">
    Copyright &copy; 2020 Dikang Li
  </div>
  <div class="footer-right">
    <nav>
      <ul>
         
          <li><a href="/">首页</a></li>
         
          <li><a href="/archives/">归档</a></li>
         
          <li><a href="/search/">搜索</a></li>
         
          <li><a href="/tags/">标签</a></li>
         
          <li><a href="/others/">其他文章</a></li>
        
      </ul>
    </nav>
  </div>
</footer>

    </div>
</body>
</html>
<!-- styles -->
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<link rel="stylesheet" href="/lib/justified-gallery/css/justifiedGallery.min.css">
<link rel="stylesheet" href="/lib/fancybox/jquery.fancybox.css">

<link rel="stylesheet" href="https://file.lantingshucheng.com/blog/v3/static/styles/gitalk.css">


<!-- jquery -->
<script src="/lib/jquery/jquery.min.js"></script>
<script src="/lib/justified-gallery/js/jquery.justifiedGallery.min.js"></script>
<script src="/lib/fancybox/jquery.fancybox.pack.js"></script>

<script type="text/javascript" src="https://file.lantingshucheng.com/blog/v3/static/scripts/md5.js"></script>
<script type="text/javascript" src="https://file.lantingshucheng.com/blog/v3/static/scripts/gitalk.min.js"></script>

<script src="/js/main.js"></script>
<!-- search -->

<!-- Google Analytics -->

<!-- Baidu Analytics -->

    <script type="text/javascript">
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?7851ca7a86be957be994acb77639a5be";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>

<!-- Disqus Comments -->


  <script type="text/javascript">
    window.onload = function(){
      if (window.location.href.indexOf('andyliwr.github.io') > -1) {
        var gitalk = new Gitalk({
          clientID: 'ad6f70df0c70d2b715f9',
          clientSecret: '40384bee244c1e17dd7c37733d21e9ef669e969c',
          repo: 'Andyliwr.github.io',
          owner: 'Andyliwr',
          admin: ['Andyliwr'],
          id: md5(location.pathname),
          distractionFreeMode: 'true'
        })
        gitalk.render('gitalk_thread')
      }
    }
  </script>


